package my.design.state;

/**
 * @author zp
 * @version 1.0
 * @description: 关闭类
 * @date 2022/10/30 16:51
 */
public class CloseState extends State {
    private final ActivityService activityService;

    public CloseState(ActivityService activityService) {
        this.activityService = activityService;
    }

    @Override
    public Result arraignment(Enum<Status> currentStatus) {

        return new Result("0001", "活动关闭状态不可提审");
    }

    @Override
    public Result checkPass(Enum<Status> currentStatus) {
        return new Result("0001", "活动关闭不可审核通过");
    }

    @Override
    public Result checkRefuse(Enum<Status>
                                      currentStatus) {
        return new Result("0001", "活动关闭不可审核拒绝");
    }

    @Override
    public Result checkRevoke(Enum<Status> currentStatus) {
        return new Result("0001", "活动关闭不可撤销审核");
    }

    @Override
    public Result close(Enum<Status> currentStatus) {
        return new Result("0001", "活动已关闭无法重复关闭");
    }

    @Override
    public Result open(Enum<Status> currentStatus) {
        activityService.getActivityInfo().setStatus(Status.Open);
        return new Result("0000", "活动开启成功");
    }

    @Override
    public Result doing(Enum<Status> currentStatus) {
        return new Result("0001", "活动关闭中活动不可执行活动中变更");
    }
}
